import express from 'express';
import ComponentController from '../controllers/component.controller.js';

const router = express.Router();

router.get('/', ComponentController.getAllComponents);
router.get('/:id', ComponentController.getComponentById);
router.get('/name/:name', ComponentController.getComponentByName);
router.post('/', ComponentController.createComponent);
router.put('/:id', ComponentController.updateComponent);
router.delete('/:id', ComponentController.deleteComponent);

export default router;